package com.lyh.notes.controller;


import com.lyh.notes.scope.RequestScopeData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api")
public class TestController {

    @Autowired
    RequestScopeData scopeData;

    @RequestMapping("/test")
    public String hello(){
        System.out.println("get in /api/test");
        System.out.println("userID"+scopeData.getUserId());
        System.out.println("token"+scopeData.getToken());
        return "hello,world";
    }
}
